<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打开窗口</title>
    <script>
        let win;
        function f1(){
            // 打开一个新的空标签页
            // window.open();
            // 打开一个指定的窗口
            open("32-获取鼠标位置.html")
        }
        function f2(){
            win = open("28-二级联动菜单.html","aa","width=400px,height=200px")
        }
        function f3(){
            win.close();
        }
        function f4(){
            let w = open("28-二级联动菜单.html","aa","width=400px,height=200px");
            let s = setTimeout(function(){
                w.close();
            },3000);
            clearTimeout(s);
        }

        function f5(){
            setInterval(function(){
                open("28-二级联动菜单.html","aa","width=400px,height=200px");
            },1000)
        }

        function f6(){
            let s = setInterval(function(){
                open("28-二级联动菜单.html","aa","width=400px,height=200px");
            },1000)
            setTimeout(function(){
                clearInterval(s);
            },5000)
        }
        function f7(){
            open("36-地址栏.html","aa","width=400px,height=200px");
        }
    </script>
</head>
<body>
<button onclick="f1()">打开一个新窗口</button><br>
<button onclick="f2()">打开小窗口</button><br>
<button onclick="f3()">关闭小窗口</button><br>
<button onclick="f4()">打开后3秒关闭小窗口</button><br>
<button onclick="f5()">每隔1秒打开一个小窗口</button><br>
<button onclick="f6()">每隔1秒打开一个小窗口,5秒后停止打开</button><br>
<button onclick="f7()">打开36</button>
</body>
</html>